<template>
 <div>
    {{aa}}
    <button @click="change">修改</button>
    <SonCom></SonCom>
 </div>
</template>
<script>
import SonCom from './Son.vue';
export default{
    components:{
        SonCom
    },
    provide(){ 
        return{
            aa:this.aa,
            say:this.saying
        }
    },
        inject:['ss','func'],
        data () {
                return {
                     aa:'我是二代'
                }
        },
        created () {
        },
        computed:{
        },
        methods:{
            change(){
                this.func('我最大')
            },
            saying(e){
                this.aa = e
            }
        }
}
</script>
<style lang='less'  scoped>
        
</style>
